<!DOCTYPE html>
<html lang="en">

{include file="Public/head"}
<head>
    <style>
        /*.tpl-login-logo {*/
            /*background: url(/assets/img/webwxgetmsgimg.jpg) center no-repeat !important;*/
        /*}*/
    </style>
</head>

<body data-type="login">
    <script src="/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <!-- 风格切换 -->
        <div class="tpl-skiner">
            <div class="tpl-skiner-toggle am-icon-cog">
            </div>
            <div class="tpl-skiner-content">
                <div class="tpl-skiner-content-title">
                    选择主题
                </div>
                <div class="tpl-skiner-content-bar">
                    <span class="skiner-color skiner-white" data-color="theme-white"></span>
                    <span class="skiner-color skiner-black" data-color="theme-black"></span>
                </div>
            </div>
        </div>
        <div class="tpl-login">
            <div class="tpl-login-content">
                <div class="tpl-login-logo" style="margin-left: 10%;width: 70%" >
                    <img src="/assets/img/webwxgetmsgimg.jpg" alt="" width="100%">
                </div>



                <form id="loginform" form="submit" class="am-form tpl-form-line-form">
                    <div class="am-form-group">
                        <input type="text" class="tpl-form-input" name="mobile" placeholder="请输入旗舰账号">

                    </div>

                    <div class="am-form-group">
                        <input type="password" class="tpl-form-input" name="password" placeholder="请输入密码">
                    </div>
                    <div class="am-form-group">
                        <button type="submit"class="am-btn am-btn-primary  am-btn-block tpl-btn-bg-color-success  tpl-login-btn">登陆</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>

</body>
{include file="Public/script"}
{include file='Public:validation'}


<script>
    //提交
    function roleSubmit(){
        var form=document.getElementById("loginform");
        var formData=new FormData(form);
        $.ajax({
            url:"{:Url('loginJudge')}",
            type:'POST',
            data:formData,
            async: false,
            cache: false,
            contentType: false, //不设置内容类型
            processData: false, //不处理数据
            success:function(res){
                console.log(res);
                if (res.code != 200) {
                    layer.msg(res.msg, {shade: 0.5, time: 2000,icon: 2});
                    return false;
                }
                layer.msg(res.msg, {shade: 0.5, time: 2000, icon: 1}, function(){
                    location.href = "{:url('Flagship/index')}";

                    // window.location.href=document.referrer;

                });
            }
        });
    }
    



</script>

</html>